///
/// \file    : IndexGraphicsPanel.cpp
/// \version : 1.0
/// \date    : 28/05/2012
/// \author  : grupo linker
///
#include "IndexGraphicsPanel.h"

namespace varayoc
{

namespace gui
{

namespace externalpanels
{

namespace linkerpanels
{

namespace graphicspanels
{

IndexGraphicsPanel::IndexGraphicsPanel()
{
   this->setName("IndexGraphicsPanel");
   this->setSubsystem("LINKER");
   this->setSelectorPanelBar("QuickAccesBar");  // consultar RN?
   setupUi();
}

QPushButton* IndexGraphicsPanel::getRadarTracksButton()
{
   return   m_radarTracksButton;
}

QPushButton* IndexGraphicsPanel::getMageEmissionsButton()
{
   return   m_mageEmissionsButton;
}

QPushButton* IndexGraphicsPanel::getTextMessageButton()
{
   return   m_textMessagesButton;
}

QPushButton* IndexGraphicsPanel::getCircularFiguresButton()
{
   return   m_circularFigureButton;
}

QPushButton* IndexGraphicsPanel::getPolygonalFiguresButton()
{
   return   m_polygonalFigureButton;
}

void IndexGraphicsPanel::setupUi()
{
   Int w = 640;   // ancho panel
   Int h = 480;   // alto panel
   resize(w, h);

   String  title = "Linker";
   m_header = new HeaderControl(QString::fromUtf8(title.c_str()));
   m_header->setParent(this);
   Int xH = 20;   // posicion horizontal Header
   Int yH = 20;   // posicion vertical Header
   m_header->move(xH, yH);

   BasicControlsCreator &bcc = BasicControlsCreator::instance();
   String   titleRadarTracks  = "Contactos de Radar";
   String   titleMageEmission = "Emisiones de Mage";
   String   titleTextMessages = "Mensaje de Texto";
   String   titleCircularFig  = "Figuras Circulares";
   String   titlePolygonalFig = "Figuras Poligonales";
   m_radarTracksButton     = bcc.createMenuButton(QString::fromUtf8(titleRadarTracks.c_str()), this);
   m_mageEmissionsButton   = bcc.createMenuButton(QString::fromUtf8(titleMageEmission.c_str()), this);
   m_textMessagesButton    = bcc.createMenuButton(QString::fromUtf8(titleTextMessages.c_str()), this);
   m_circularFigureButton  = bcc.createMenuButton(QString::fromUtf8(titleCircularFig.c_str()), this);
   m_polygonalFigureButton = bcc.createMenuButton(QString::fromUtf8(titlePolygonalFig.c_str()), this);

   m_botones.push_back(m_radarTracksButton);
   m_botones.push_back(m_mageEmissionsButton);
   m_botones.push_back(m_textMessagesButton);
   m_botones.push_back(m_circularFigureButton);
   m_botones.push_back(m_polygonalFigureButton);

   m_menuControl  = new MenuControl(m_botones);
   Int xM = 50;   // posicion horizontal Menu
   Int yM = 100;  // posicion vertical Menu
   m_menuControl->move(xM, yM);
   m_menuControl->setParent(this);
}

IndexGraphicsPanel::~IndexGraphicsPanel()
{
}

}}}}}
